import {
  Entity,
  Column,
  PrimaryGeneratedColumn,
  OneToOne,
  ManyToOne,
} from 'typeorm';
import { Character } from './characteristic.entity';
import { Master } from '../masters/master.entity';
@Entity()
export class CatsMember {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  name: string;

  @Column()
  age: number;

  @Column()
  breed: string;

  @OneToOne((type) => Character, (Character) => Character.cats)
  character: Character;

  @ManyToOne((type) => Master, (Master) => Master.catsMember)
  master: Master;
}
